
from font_total_and_ota_create import create_new_font
from image2bin import image2bin
from merge_all_bin import merge_all_bin
import os
from os import path
import shutil

if __name__ == "__main__":
    os.chdir("./picture")
    print(os.getcwd())
    files_list = os.listdir(".")
    ext_support = (".jpg", ".bmp", ".png")
    for name in files_list:
        ext = path.splitext(path.split(name)[-1])[-1]
        if ext in ext_support:
            image2bin(name)
    merge_all_bin()
    os.chdir("../")
    print(os.getcwd())
    create_new_font("./picture/All.bin", "./font/LeFit_L42AP_FONT_R1.0.bin", "Picture_11.bin", "LeFit_L42AP_FONT_R1.1.bin")
    shutil.copy("./picture/address.log", "./")

